import {getList} from "../api/api"
// import { connect } from "react-redux"
// import Play from "./play"
// const creator = (type, payload) => ({ type, payload })
//获取产品列表
import { createStore } from 'redux';
let store = createStore(counter);
const getProucts =async () => {
	let data
   await getList(400162138)
        .then(res =>{
			store.dispatch({
			  type: 'ADD_TODO',
			  payload: res
			});
		})
}
function counter(state, action) {
  switch (action.type) {
	case 'ADD_TODO':
    return action.payload;
  }
}
store.subscribe(() =>
  console.log(store.getState())
);
export {getProucts}